package com.xuan.contest.entry;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;

/**
 * @author XinZhaoXuan
 * @Date 2018-09-07 09:47
 */
@Data
@TableName("t_user_answer")
@EqualsAndHashCode(callSuper = false)
public class UserAnswerEntity extends Model<UserAnswerEntity> {

    /**
     * Id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * ContestId
     */
    @TableField("contest_id")
    private Integer contestId;

    /**
     * UserId
     */
    @TableField("user_id")
    private Integer userId;

    /**
     * UserId
     */
    @TableField("problem_id")
    private Integer problemId;

    /**
     * Answer
     */
    private Integer answer;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }
}
